<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/customer/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
				 <!-- 用户 -->
                 <label class="col-sm-2 control-label">用户</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="user-id" name="user.id" value="${n.user.id }" class="form-control">
                 	<input type="text"  placeholder="请选择用户" class="form-control" id="user-name" value="${n.user.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/user/search',
						                 	name: 'id',
						                 	idInput: 'user-id',
						                 	nameInput: 'user-name'
						                 	})" />
						                 	
                 </div>
                 
				 <!-- 0禁用，1启用 -->
                 <label class="col-sm-2 control-label">0禁用，1启用</label>
                 <div class="col-sm-4">
                 	${enum:detail('CustomerStatus', 'status', n.status)}
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 机构名称 -->
                 <label class="col-sm-2 control-label">机构名称</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="orgName" value="${n.orgName }">
                 </div>
                 
				 <!-- 客户名称 -->
                 <label class="col-sm-2 control-label">客户名称</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="name" value="${n.name }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 到期时间 -->
                 <label class="col-sm-2 control-label">到期时间</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="expireDate" value="<fmt:formatDate value='${n.expireDate }' pattern=''/>" onclick="laydate({format: ''})">
                 </div>
                 
				 <!-- 身份证 -->
                 <label class="col-sm-2 control-label">身份证</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="idCard" value="${n.idCard }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 手机号码 -->
                 <label class="col-sm-2 control-label">手机号码</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="mobile" value="${n.mobile }">
                 </div>
                 
				 <!-- 客户职称 -->
                 <label class="col-sm-2 control-label">客户职称</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="title" value="${n.title }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 省 -->
                 <label class="col-sm-2 control-label">省</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="province-id" name="province.id" value="${n.province.id }" class="form-control">
                 	<input type="text"  placeholder="请选择省" class="form-control" id="province-name" value="${n.province.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/province/search',
						                 	name: 'id',
						                 	idInput: 'province-id',
						                 	nameInput: 'province-name'
						                 	})" />
						                 	
                 </div>
                 
				 <!-- 市 -->
                 <label class="col-sm-2 control-label">市</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="city-id" name="city.id" value="${n.city.id }" class="form-control">
                 	<input type="text"  placeholder="请选择市" class="form-control" id="city-name" value="${n.city.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/city/search',
						                 	name: 'id',
						                 	idInput: 'city-id',
						                 	nameInput: 'city-name'
						                 	})" />
						                 	
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 区县 -->
                 <label class="col-sm-2 control-label">区县</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="district-id" name="district.id" value="${n.district.id }" class="form-control">
                 	<input type="text"  placeholder="请选择区县" class="form-control" id="district-name" value="${n.district.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/district/search',
						                 	name: 'id',
						                 	idInput: 'district-id',
						                 	nameInput: 'district-name'
						                 	})" />
						                 	
                 </div>
                 
				 <!-- address -->
                 <label class="col-sm-2 control-label">address</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="address" value="${n.address }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 性别 -->
                 <label class="col-sm-2 control-label">性别</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="sex" value="${n.sex }">
                 </div>
                 
				 <!-- 所属代理商 -->
                 <label class="col-sm-2 control-label">所属代理商</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="agent-id" name="agent.id" value="${n.agent.id }" class="form-control">
                 	<input type="text"  placeholder="请选择所属代理商" class="form-control" id="agent-name" value="${n.agent.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/agent/search',
						                 	name: 'id',
						                 	idInput: 'agent-id',
						                 	nameInput: 'agent-name'
						                 	})" />
						                 	
                 </div>
            </div>
            <div class="form-group">     
                 
             </div>	
        	
		</form>
</div>

<%@include file="/common/foot.jsp" %>

</body>
</html>
